<?php

$mcrp = './';
include_once('functions/session.php');
include_once('skin/default.php');
include_once('functions/users.php');

$SkinTitle = 'µContest - Classement';

if($mcuser->isadmin && isset($_GET['rank']))
{
	if($_GET['rank'] == 1) ComputeClassement();
	if($_GET['rank'] == 2) ComputeContestsPoints(true);
}

define('USERS_PER_PAGE', 20);

if(isset($_GET['p']) && is_numeric($_GET['p']))
	$p = $_GET['p'];
else
	$p = 1;

include('skin/header.php');

?>

<div class="mc_box">
	<h3>Classement<?php if($mcuser->isadmin) echo '<a href="rank.php?p=' . $p . '&rank=1"><span style="padding-left:10px; font-size:.6em;">Recalculer le classement</span></a> - <a href="rank.php?p=' . $p . '&rank=2"><span style="font-size:.6em;">Recalculer les points</span></a>'; ?></h3>
	<div class="mc_contest_view_text">
		<br />
		<?php DisplayCacheContent('include/rank.php', 60, array(), $p); ?>
		</div>
	</div>
</div>	

<?php

include('skin/footer.php');

?>